package com.cc8w.home.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.cc8w.home.service.UserService;

@RestController
@RequestMapping("/home/index")
public class IndexController {
    @Autowired
    private UserService userServiceImpl;
    
  //引入dubbo接口项目的接口,调用的是provider的实现类
    //@Reference(version = "1.0.0", url = "zookeeper://127.0.0.1:2181")
    @Reference(version = "1.0.0")
    private UserService userServiceImpl1;


    @RequestMapping("/index")
    public Object index(){

        System.out.println(222);
        return userServiceImpl1.getUser(1);

    }



}